import request from '@/utils/request'

// 查询渠道授权列表
export function listChannelGrant(query) {
  return request({
    url: '/admin/channel/grant/list',
    method: 'get',
    params: query
  })
}

// 查询渠道授权详细
export function getChannelGrant(configId) {
  return request({
    url: '/admin/channel/grant/' + configId,
    method: 'get'
  })
}

// 新增渠道授权
export function addChannelGrant(data) {
  return request({
    url: '/admin/channel/grant/save',
    method: 'post',
    data: data
  })
}

// 修改渠道授权
export function editChannelGrant(data) {
  return request({
    url: '/admin/channel/grant/update',
    method: 'put',
    data: data
  })
}

// 删除渠道授权
export function delChannelGrant(configId) {
  return request({
    url: '/admin/channel/grant/remove/' + configId,
    method: 'delete'
  })
}
